import React from 'react'
import { withRouter } from 'react-router'

import { Button, Icon} from 'antd-mobile';
import "./Top.css"
function Top(props) {
    const onClick = () => {
        props.history.go(-1)
    }

    let { title } = props
    return (
        <div>
            <div className="top">
                <Button icon="left" inline onClick={() => onClick()} size="small" style={{ width: "0.8rme", background: "tomato", border: "1px solid tomato", marginRight: '4px', position: "absolute", top: "0.2rem", left: "0.2rem", zIndex: "100" }}></Button>
                <p className="top_p">{title}</p>
            </div>
        </div>
    )
}
export default withRouter(Top)